package base;

import java.util.Vector;

import base.audio.AudioSocket;
import base.transporte.SRSocket;
import base.transporte.SRWelcomer;

public class GerenciadorConexoes {
	private static GerenciadorConexoes instancia = null;

	private Vector<SRWelcomer> srWelcomers;
	private Vector<SRSocket> srSockets;
	private Vector<AudioSocket> audioSockets;

	private GerenciadorConexoes() {
		srWelcomers = new Vector<SRWelcomer>();
		srSockets = new Vector<SRSocket>();
		audioSockets = new Vector<AudioSocket>();
	}

	public static GerenciadorConexoes getInstance() {
		if (instancia == null) {
			instancia = new GerenciadorConexoes();
		}

		return instancia;
	}

	public void inserirSRSocket(SRSocket skt) {
		srSockets.add(skt);
	}

	public void inserirAudioSocket(AudioSocket skt) {
		audioSockets.add(skt);
	}

	public void inserirSRWelcomer(SRWelcomer skt) {
		srWelcomers.add(skt);
	}
	
	public void removerSRSocket(SRSocket skt){
		srSockets.remove(skt);
	}
	
	public void removerAudioSocket(AudioSocket skt){
		audioSockets.remove(skt);
	}
	
	public void removerSRWelcomer(SRWelcomer skt){
		srWelcomers.remove(skt);
	}

	public Vector<SRWelcomer> getSrWelcomers() {
		return srWelcomers;
	}

	public Vector<SRSocket> getSrSockets() {
		return srSockets;
	}

	public Vector<AudioSocket> getAudioSockets() {
		return audioSockets;
	}
	
	

}
